Skip to main content

3.2 Creating Data

The process for creating encrypted data is as follows:

  1. Prepare the content of the plaintext data.
  2. Use msgpack to package the data.
  3. Calculate the SHA256 HASH of the packaged data.
  4. Generate a random number, establish a derivation index, and from it derive the encryption private key.
  5. Encrypt the data with the derived public key.
  6. Perform a Bitcoin Message signature on the encrypted data using the account's private key.
  7. Assemble the data script.
  8. Construct and broadcast the transaction.